<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // const let 更好 污染 window
const pizza='lwb';
console.log(a);// 不用var，变量的提升，提升到最上面，值并没有提升
var a='11';
console.log(fn);//函数也会变量提升,值也会提升
console.log(pizza);//let const 不支持变量的提升
function fn(){
console.log('fn');
}
    </script>
</body>
</html>